Skip to content

Conversation

@patrickfreed
Copy link
Contributor

This PR updates the examples and the readme to use the new API.

@patrickfreed patrickfreed requested a review from kmahar October 22, 2019 22:13
Copy link
Contributor

@kmahar kmahar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one thing re these compiling, lgtm otherwise

try items.insertOne(["sku": "nuts-111", "name": "Pecans", "start": .datetime(currentDate)], session: s1)
// End Causal Consistency Example 1

let client2 = try MongoClient()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to be updated too to make these compile?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have this ticket open about making sure examples still compile when we do a release, but I wonder if it would be better to make that an evergreen task instead so we catch these things earlier? what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it to compile.

I do think we should incorporate compiling the examples into our evg matrix at least by 1.0, but we do have that circularity issue that I don't really know how to get around. Pre 1.0, we do have the problem that the API in the examples might be vastly different than the API in the latest release, but that will go away real soon so I don't think it is a big issue. I think the API difference is why we were only planning to automate it on releases.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a comment on the ticket about adding this to evg

@patrickfreed patrickfreed merged commit b880706 into master Oct 24, 2019
@patrickfreed patrickfreed deleted the SWIFT-642/bson-examples branch October 24, 2019 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants